﻿using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace My.Application.Contracts.Comments.Dtos
{
    public class CreateCommentDtoValidator : AbstractValidator<CreateCommentDto>
    {
        public CreateCommentDtoValidator()
        {
            RuleFor(x => x.IssueId).NotEqual(Guid.Empty).WithMessage("问题id不可为空");
            RuleFor(x => x.Text).NotNull().NotEmpty().WithMessage("评论的内容不可为空");
        }
    }
}
